/*******************************************************************************
** MutualInformation.h
** Part of the mutual information toolbox
*******************************************************************************/

#ifndef __MutualInformation_H
#define __MutualInformation_H

#ifdef __cplusplus
extern "C" {
#endif 

typedef struct jpState
{
  float *jointProbabilityVector;
  int numJointStates;
  float *firstProbabilityVector;
  int numFirstStates;
  float *secondProbabilityVector;
  int numSecondStates;
} JointProbabilityState;

typedef struct pState
{
  float *probabilityVector;
  int numStates;
} ProbabilityState;

float calculateMutualInformation(short *dataVector, short *targetVector, const int vectorLength, const int threadIdx);
JointProbabilityState calculateJointProbability(int *firstVector, int *secondVector, int vectorLength, const int threadIdx);
void MemInit();
short  normaliseArrayFast(short *vector, int vectorLength);


#ifdef __cplusplus
}
#endif

#endif

